package com.app.miwawa.api.eam.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

import org.framework.common.api.entity.CommonEntityUUID;
import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 签到
 * <p>描述: </p>
 * <p>Company: Professional</p>
 * @author chanlong(陈龙)
 * @date 2016年2月11日 上午12:17:13
 * @version 1.0.2016
 */
@Entity @Table(name = "TB_EAM_STUDENT_CHECK")
public class StudentCheck extends CommonEntityUUID {

	/** serialVersionUID(long):. */
	private static final long serialVersionUID = -4158217095701863674L;

	// 签到日期
	@Temporal(TemporalType.DATE)
	@JsonFormat(pattern="yyyy-MM-dd", timezone="GMT+8")
	@DateTimeFormat(pattern="yyyy-MM-dd")
	@Column(name = "check_date", nullable = true)
	private Date checkDate;
	
	// 签到时间
	@Temporal(TemporalType.TIME)
	@JsonFormat(pattern="HH:mm", timezone="GMT+8")
	@DateTimeFormat(pattern="HH:mm")
	@Column(name = "check_time", nullable = true)
	private Date checkTime;

	// 学员
	@Column(name = "student", length = 50, nullable = true)
	private String student;
	
	// 学员ID
	@Column(name = "student_id", length = 50, nullable = true)
	private String studentId;
	
	// 班级
	@Column(name = "classes", length = 50, nullable = true)
	private String classes;
	
	// 班级ID
	@Column(name = "classes_id", length = 50, nullable = true)
	private String classesId;
	
	// 合同ID
	@Column(name = "contract_id", length = 50, nullable = true)
	private String contractId;
	
	// 参与者（家长存＝家长:关系，老师存＝老师:姓名）
	@Column(name = "actor", length = 50, nullable = true)
	private String actor;
		
	// 参与者ID（家长ID、老师ID）
	@Column(name = "actor_id", length = 50, nullable = true)
	private String actorId;
	
	// 参与者记录时间
	@Temporal(TemporalType.TIMESTAMP)
	@JsonFormat(pattern="yyyy-MM-dd HH:mm", timezone="GMT+8")
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
	@Column(name = "actor_date", nullable = true)
	private Date actorDate;
	
	@Transient
	private String item;
	
	public StudentCheck() {
		this.actorDate = new Date();
	}

	public Date getCheckDate() {
		return checkDate;
	}

	public void setCheckDate(Date checkDate) {
		this.checkDate = checkDate;
	}

	public Date getCheckTime() {
		return checkTime;
	}

	public void setCheckTime(Date checkTime) {
		this.checkTime = checkTime;
	}

	public String getStudent() {
		return student;
	}

	public void setStudent(String student) {
		this.student = student;
	}

	public String getStudentId() {
		return studentId;
	}

	public void setStudentId(String studentId) {
		this.studentId = studentId;
	}

	public String getClasses() {
		return classes;
	}

	public void setClasses(String classes) {
		this.classes = classes;
	}

	public String getClassesId() {
		return classesId;
	}

	public String getActor() {
		return actor;
	}

	public void setActor(String actor) {
		this.actor = actor;
	}

	public String getActorId() {
		return actorId;
	}

	public void setActorId(String actorId) {
		this.actorId = actorId;
	}

	public Date getActorDate() {
		return actorDate;
	}

	public void setActorDate(Date actorDate) {
		this.actorDate = actorDate;
	}

	public void setClassesId(String classesId) {
		this.classesId = classesId;
	}

	public String getContractId() {
		return contractId;
	}

	public void setContractId(String contractId) {
		this.contractId = contractId;
	}

	public String getItem() {
		return item;
	}

	public void setItem(String item) {
		this.item = item;
	}
}
